package com.longrise.filedownloaderdemo;

import android.app.Application;
import android.content.Intent;

import com.longrise.filedownloader.DownloadService;

/**
 * Created by callxkj on 16/4/6.
 *
 */
public class MyApplication extends Application{

    private static Application instance;
    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
        DownloadService.setUserid("haha");
        this.startService(new Intent(this, DownloadService.class));
    }

    /**
     * 获取application 对象
     * @return
     */
    public static Application getInstance(){
        return instance;
    }
}
